﻿using EnvDTE;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VisualPoint.Controls.Environments;

namespace VisualPoint.Controls.Actions
{
    public class LinkedWindowTypeItemCollection : Collection<LinkedWindowTypeItem>
    {

        //private static LinkedWindowTypeItemDictionary _Dictionary;
        //public static LinkedWindowTypeItemDictionary Dictionary
        //{
        //    get
        //    {
        //        if (_Dictionary == null)
        //        {
        //            CreateItems();

        //        }
        //        return _Dictionary;
        //    }
        //}

        private static LinkedWindowTypeItemCollection _Default;
        public static LinkedWindowTypeItemCollection Default
        {
            get
            {
                if (_Default == null)
                {
                    CreateItems();
                }
                return _Default;
            }
        }

        private static void CreateItems()
        {
            _Default = new LinkedWindowTypeItemCollection();
            //_Dictionary = new LinkedWindowTypeItemDictionary();

            AddItem(new LinkedWindowTypeItem(vsLinkedWindowType.vsLinkedWindowTypeDocked, "Docked"));
            AddItem(new LinkedWindowTypeItem(vsLinkedWindowType.vsLinkedWindowTypeHorizontal, "Horizontal"));
            AddItem(new LinkedWindowTypeItem(vsLinkedWindowType.vsLinkedWindowTypeVertical, "Vertical"));
            AddItem(new LinkedWindowTypeItem(vsLinkedWindowType.vsLinkedWindowTypeTabbed, "Tabbed"));
        }

        private static void AddItem(LinkedWindowTypeItem item)
        {
            _Default.Add(item);
            //_Dictionary.Add(item.Name, item);
        }
    }
}
